home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / error_hn / rdblib / rbprobrp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-04-09  |  14.1 KB  |  455 lines

  1. VERSION 2.00
  2. Begin Form RBProbRpt
  3. BackColor       =   &H00FFFFFF&
  4. Caption         =   "Problem Report Form"
  5. ClientHeight    =   4020
  6. ClientLeft      =   1095
  7. ClientTop       =   1485
  8. ClientWidth     =   7365
  9. Height          =   4425
  10. Icon            =   RBPROBRP.FRX:0000
  11. Left            =   1035
  12. LinkTopic       =   "Form1"
  13. ScaleHeight     =   4020
  14. ScaleWidth      =   7365
  15. Top             =   1140
  16. Width           =   7485
  17. Begin TextBox TxtErrMsg
  18. BackColor       =   &H00FFFFFF&
  19. Height          =   555
  20. Left            =   1440
  21. MultiLine       =   -1  'True
  22. TabIndex        =   31
  23. Tag             =   "Enter the error message created by Visual Basic"
  24. Top             =   5580
  25. Width           =   8055
  26. Begin CommonDialog CMDialog1
  27. Left            =   9060
  28. Top             =   6120
  29. Begin TextBox TxSystem
  30. BackColor       =   &H00FFFFFF&
  31. Height          =   315
  32. Left            =   1920
  33. TabIndex        =   28
  34. Tag             =   "Enter the name of the system that had the problem"
  35. Top             =   1320
  36. Width           =   3135
  37. Begin TextBox TxVer
  38. BackColor       =   &H00FFFFFF&
  39. Height          =   315
  40. Left            =   6600
  41. TabIndex        =   27
  42. Tag             =   "Enter the version number of the system you are using"
  43. Top             =   1320
  44. Width           =   2835
  45. Begin SSCommand BtnSelPrtr
  46. Caption         =   "Select Printer"
  47. Height          =   315
  48. Left            =   540
  49. TabIndex        =   26
  50. Top             =   6180
  51. Width           =   2850
  52. Begin Frame Frame3
  53. Caption         =   "Describe the function being performed, the actions leading up to the error and the problem that occurred"
  54. ForeColor       =   &H000000FF&
  55. Height          =   1875
  56. Index           =   0
  57. Left            =   120
  58. TabIndex        =   25
  59. Top             =   3600
  60. Width           =   9375
  61. Begin TextBox TxtProblem
  62. Height          =   1515
  63. Left            =   60
  64. MultiLine       =   -1  'True
  65. ScrollBars      =   2  'Vertical
  66. TabIndex        =   13
  67. Tag             =   "Enter the description of the problem and the actions leading up to the problem"
  68. Top             =   240
  69. Width           =   9255
  70. Begin Frame Frame2
  71. Caption         =   "Effect Of Problem"
  72. Height          =   915
  73. Left            =   120
  74. TabIndex        =   24
  75. Top             =   2640
  76. Width           =   9375
  77. Begin TextBox Text1
  78. BackColor       =   &H00FFFFFF&
  79. Height          =   315
  80. Index           =   4
  81. Left            =   2400
  82. TabIndex        =   12
  83. Tag             =   "Enter the description of the other effect of this problem"
  84. Top             =   540
  85. Width           =   6855
  86. Begin CheckBox Check1
  87. Caption         =   "Other (Please Specify)"
  88. Height          =   375
  89. Index           =   4
  90. Left            =   120
  91. TabIndex        =   11
  92. Tag             =   "Check this box if there is some other effect with this problem"
  93. Top             =   480
  94. Width           =   2295
  95. Begin CheckBox Check1
  96. Caption         =   "Can Use System, But Functionality Is Limited"
  97. Height          =   225
  98. Index           =   3
  99. Left            =   4500
  100. TabIndex        =   10
  101. Tag             =   "Check this box if you can use the system, but the functionality of the system is limited because of this problem"
  102. Top             =   240
  103. Width           =   4575
  104. Begin CheckBox Check1
  105. Caption         =   "Can't use this function"
  106. Height          =   225
  107. Index           =   2
  108. Left            =   2040
  109. TabIndex        =   9
  110. Tag             =   "Check this box if you can't use this function because of the problem"
  111. Top             =   240
  112. Width           =   2295
  113. Begin CheckBox Check1
  114. Caption         =   "Can't Use System"
  115. Height          =   225
  116. Index           =   1
  117. Left            =   120
  118. TabIndex        =   8
  119. Tag             =   "Check this box if you can't use the system because of this problem"
  120. Top             =   240
  121. Width           =   1875
  122. Begin Frame Frame1
  123. Caption         =   "Type of Problem"
  124. Height          =   915
  125. Left            =   120
  126. TabIndex        =   23
  127. Top             =   1680
  128. Width           =   9375
  129. Begin CheckBox Check1
  130. Caption         =   "Problem is Repeatable (Consistent)"
  131. Height          =   255
  132. Index           =   0
  133. Left            =   5880
  134. TabIndex        =   5
  135. Tag             =   "Check this box if the problem is repeatable (occurs consistently)"
  136. Top             =   240
  137. Width           =   3375
  138. Begin TextBox TxtTypeProb
  139. BackColor       =   &H00FFFFFF&
  140. Height          =   285
  141. Left            =   2400
  142. TabIndex        =   7
  143. Tag             =   "Enter the description of the type of problem"
  144. Top             =   510
  145. Width           =   6855
  146. Begin OptionButton OptTypeProb
  147. Caption         =   "Other (Please Specify)"
  148. Height          =   255
  149. Index           =   2
  150. Left            =   120
  151. TabIndex        =   6
  152. Tag             =   "Select this option if some other type of problem occurred"
  153. Top             =   480
  154. Width           =   2295
  155. Begin OptionButton OptTypeProb
  156. Caption         =   "System Didn't Work As Expected"
  157. Height          =   255
  158. Index           =   1
  159. Left            =   2700
  160. TabIndex        =   4
  161. Tag             =   "Select this option if the system didn't work as expected"
  162. Top             =   240
  163. Width           =   3195
  164. Begin OptionButton OptTypeProb
  165. Caption         =   "System Ended Abnormally"
  166. Height          =   195
  167. Index           =   0
  168. Left            =   120
  169. TabIndex        =   3
  170. Tag             =   "Select this option if the system terminated abnormally"
  171. Top             =   240
  172. Width           =   2535
  173. Begin SSPanel cmsg
  174. Align           =   2  'Align Bottom
  175. Alignment       =   1  'Left Justify - MIDDLE
  176. BevelInner      =   1  'Inset
  177. FloodShowPct    =   0   'False
  178. ForeColor       =   &H00FF0000&
  179. Height          =   315
  180. Left            =   0
  181. TabIndex        =   20
  182. Top             =   3705
  183. Width           =   7365
  184. Begin SSCommand BtnCancel
  185. Caption         =   "Exit"
  186. Height          =   315
  187. Left            =   6180
  188. TabIndex        =   15
  189. Top             =   6180
  190. Width           =   2850
  191. Begin SSCommand BtnPrint
  192. Caption         =   "Print Problem Report"
  193. Height          =   315
  194. Left            =   3360
  195. TabIndex        =   14
  196. Top             =   6180
  197. Width           =   2850
  198. Begin SSPanel Panel3D1
  199. Align           =   1  'Align Top
  200. BackColor       =   &H00FFFFFF&
  201. Caption         =   "Problem Report Form"
  202. Font3D          =   1  'Raised w/light shading
  203. FontBold        =   -1  'True
  204. FontItalic      =   0   'False
  205. FontName        =   "MS Sans Serif"
  206. FontSize        =   18
  207. FontStrikethru  =   0   'False
  208. FontUnderline   =   0   'False
  209. ForeColor       =   &H00FF0000&
  210. Height          =   435
  211. Left            =   0
  212. TabIndex        =   21
  213. Top             =   0
  214. Width           =   7365
  215. Begin TextBox Text1
  216. BackColor       =   &H00FFFFFF&
  217. Height          =   315
  218. Index           =   2
  219. Left            =   6600
  220. TabIndex        =   2
  221. Tag             =   "Enter the name of the contact person"
  222. Top             =   960
  223. Width           =   2835
  224. Begin TextBox Text1
  225. BackColor       =   &H00FFFFFF&
  226. Height          =   315
  227. Index           =   1
  228. Left            =   1920
  229. TabIndex        =   1
  230. Tag             =   "Enter the name of your organization"
  231. Top             =   960
  232. Width           =   3135
  233. Begin TextBox Text1
  234. BackColor       =   &H00FFFFFF&
  235. Height          =   315
  236. Index           =   0
  237. Left            =   1920
  238. MaxLength       =   50
  239. TabIndex        =   0
  240. Tag             =   "Enter the name of the person who is reporting the problem"
  241. Top             =   540
  242. Width           =   4575
  243. Begin Label Label1
  244. AutoSize        =   -1  'True
  245. BackColor       =   &H00FFFFFF&
  246. Caption         =   "Error Message"
  247. ForeColor       =   &H000000FF&
  248. Height          =   195
  249. Index           =   7
  250. Left            =   120
  251. TabIndex        =   33
  252. Top             =   5820
  253. Width           =   1230
  254. Begin Label Label1
  255. AutoSize        =   -1  'True
  256. BackColor       =   &H00FFFFFF&
  257. Caption         =   "Visual Basic"
  258. ForeColor       =   &H000000FF&
  259. Height          =   195
  260. Index           =   6
  261. Left            =   120
  262. TabIndex        =   32
  263. Top             =   5580
  264. Width           =   1290
  265. Begin Label Label1
  266. AutoSize        =   -1  'True
  267. BackColor       =   &H00FFFFFF&
  268. Caption         =   "System..................."
  269. ForeColor       =   &H00000000&
  270. Height          =   195
  271. Index           =   5
  272. Left            =   120
  273. TabIndex        =   30
  274. Top             =   1440
  275. Width           =   1755
  276. Begin Label Label1
  277. AutoSize        =   -1  'True
  278. BackColor       =   &H00FFFFFF&
  279. Caption         =   "Version..........."
  280. ForeColor       =   &H00000000&
  281. Height          =   195
  282. Index           =   3
  283. Left            =   5160
  284. TabIndex        =   29
  285. Top             =   1380
  286. Width           =   1305
  287. Begin Label Label1
  288. AutoSize        =   -1  'True
  289. BackColor       =   &H00FFFFFF&
  290. Caption         =   "On"
  291. ForeColor       =   &H00000000&
  292. Height          =   195
  293. Index           =   4
  294. Left            =   6600
  295. TabIndex        =   22
  296. Top             =   600
  297. Width           =   255
  298. Begin Label Label1
  299. AutoSize        =   -1  'True
  300. BackColor       =   &H00FFFFFF&
  301. Caption         =   "Problem Reported By"
  302. ForeColor       =   &H000000FF&
  303. Height          =   195
  304. Index           =   2
  305. Left            =   60
  306. TabIndex        =   19
  307. Top             =   600
  308. Width           =   1800
  309. Begin Label Label1
  310. AutoSize        =   -1  'True
  311. BackColor       =   &H00FFFFFF&
  312. Caption         =   "Contact Person"
  313. ForeColor       =   &H00000000&
  314. Height          =   195
  315. Index           =   1
  316. Left            =   5160
  317. TabIndex        =   18
  318. Top             =   1020
  319. Width           =   1320
  320. Begin Label Label1
  321. AutoSize        =   -1  'True
  322. BackColor       =   &H00FFFFFF&
  323. Caption         =   "Organization............"
  324. ForeColor       =   &H00000000&
  325. Height          =   195
  326. Index           =   0
  327. Left            =   60
  328. TabIndex        =   17
  329. Top             =   1080
  330. Width           =   1800
  331. Begin Label RBDateTime
  332. BackColor       =   &H00FFFFFF&
  333. BorderStyle     =   1  'Fixed Single
  334. Caption         =   "Date - Time"
  335. Height          =   315
  336. Left            =   6960
  337. TabIndex        =   16
  338. Top             =   540
  339. Width           =   2535
  340. Option Explicit
  341. Dim RB_Svframeheight As Integer
  342. Dim RB_Svtextheight As Integer
  343. Dim RB_SvErrMsgTop As Integer
  344. Dim iFirstTry As Integer        ' Indicates if first try to print - check for
  345.                                 ' missing fields only done on first try
  346. Sub BtnCancel_Click ()
  347.     If RB_LogFileOpen Then
  348.         RB_TblErrorLog![User Name] = RB_UserName
  349.         RB_TblErrorLog![Function Description] = TxtProblem.Text
  350.         If OptTypeProb(0) = True Then
  351.             RB_TblErrorLog![Type Of Problem] = OptTypeProb(0).Caption
  352.         ElseIf OptTypeProb(1) = True Then
  353.             RB_TblErrorLog![Type Of Problem] = OptTypeProb(1).Caption
  354.         Else
  355.             RB_TblErrorLog![Type Of Problem] = TxtTypeProb.Text
  356.         End If
  357.     End If
  358.     Unload RBProbRpt
  359. End Sub
  360. Sub BtnPrint_Click ()
  361.     Dim msg As String
  362.     If iFirstTry Then
  363.         iFirstTry = False
  364.         If Text1(0).Text = "" Or TxtProblem.Text = "" Or TxtErrMsg = "" Then
  365.             Beep
  366.             msg = "You have not completed all of the required fields indicated by RED labels.  "
  367.             msg = msg + "These fields are required to research and resolve the error.  "
  368.             msg = msg + "Please fill them in now."
  369.             MsgBox msg, 0, "Missing Required Fields!"
  370.             Exit Sub
  371.         End If
  372.     End If
  373.     mousepointer = HOURGLASS
  374.     BtnPrint.Visible = False
  375.     BtnCancel.Visible = False
  376.     BtnSelPrtr.Visible = False
  377.     cmsg.Visible = False
  378.     RB_Svframeheight = Frame3(0).Height
  379.     RB_Svtextheight = TxtProblem.Height
  380.     RB_SvErrMsgTop = TxtErrMsg.Top
  381.     TxtErrMsg.Top = cmsg.Top - TxtErrMsg.Height - 100
  382.     Label1(6).Top = TxtErrMsg.Top
  383.     Label1(7).Top = Label1(6).Top + Label1(7).Height
  384.     Frame3(0).Height = TxtErrMsg.Top - Frame3(0).Top - 100
  385.     TxtProblem.Height = Frame3(0).Height - 300
  386.     RBProbRpt.Refresh
  387.     DoEvents
  388.     mousepointer = HOURGLASS
  389.     RBProbRpt.PrintForm
  390.     mousepointer = HOURGLASS
  391.     RBScrn.Show MODAL
  392.     RBErrFrm.WindowState = NORMAL
  393.     RBProbRpt.WindowState = MAXIMIZED
  394.     RBProbRpt.Visible = True
  395.     Frame3(0).Height = RB_Svframeheight
  396.     TxtProblem.Height = RB_Svtextheight
  397.     TxtErrMsg.Top = RB_SvErrMsgTop
  398.     Label1(6).Top = TxtErrMsg.Top
  399.     Label1(7).Top = Label1(6).Top + Label1(7).Height
  400.     BtnPrint.Visible = True
  401.     BtnCancel.Visible = True
  402.     BtnSelPrtr.Visible = True
  403.     cmsg.Visible = True
  404.     BtnCancel.SetFocus
  405.     RBProbRpt.Refresh
  406.     mousepointer = DEFAULT
  407. End Sub
  408. Sub BtnSelPrtr_Click ()
  409.     CmDialog1.DialogTitle = "Problem Report Printer Setup"
  410.     CmDialog1.PrinterDefault = True
  411.     CmDialog1.Flags = PD_PRINTSETUP
  412.     CmDialog1.Action = 5
  413. End Sub
  414. Sub Check1_GotFocus (Index As Integer)
  415.     cmsg.Caption = Check1(Index).Tag
  416. End Sub
  417. Sub Check1_LostFocus (Index As Integer)
  418.     cmsg.Caption = ""
  419. End Sub
  420. Sub Form_Load ()
  421.     RBDateTime.Caption = Format$(Now, "MM/DD/YY - HH:MM:SS")
  422.     Text1(0).Text = RB_UserName
  423.     iFirstTry = True
  424.     On Error Resume Next
  425.     txsystem.Text = rb_systemname
  426.     txver.Text = rb_version
  427.     On Error GoTo 0
  428. End Sub
  429. Sub OptTypeProb_GotFocus (Index As Integer)
  430.     cmsg.Caption = OptTypeProb(Index).Tag
  431. End Sub
  432. Sub OptTypeProb_LostFocus (Index As Integer)
  433.     cmsg.Caption = ""
  434. End Sub
  435. Sub Text1_GotFocus (Index As Integer)
  436.     Text1(Index).BackColor = BLUE
  437.     Text1(Index).ForeColor = WHITE
  438.     cmsg.Caption = Text1(Index).Tag
  439. End Sub
  440. Sub Text1_LostFocus (Index As Integer)
  441.     Text1(Index).BackColor = WHITE
  442.     Text1(Index).ForeColor = BLACK
  443.     cmsg.Caption = ""
  444. End Sub
  445. Sub TxtProblem_GotFocus ()
  446.     TxtProblem.BackColor = BLUE
  447.     TxtProblem.ForeColor = WHITE
  448.     cmsg.Caption = TxtProblem.Tag
  449. End Sub
  450. Sub TxtProblem_LostFocus ()
  451.     TxtProblem.BackColor = WHITE
  452.     TxtProblem.ForeColor = BLACK
  453.     cmsg.Caption = ""
  454. End Sub
  455.